<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang=""
	  xmlns:th="http://www.w3.org/1999/xhtml"
	  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"

	  >

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>home</title>
	<meta name="description" content="home">
	<meta name="viewport" content="width=device-width, initial-scale=1">


	<link rel="stylesheet" href="/resa/css/normalize.css">
	<link rel="stylesheet" href="/resa/css/bootstrap.min.css">

	<link rel="stylesheet" href="/resa/css/font-awesome.min.css">
	<link rel="stylesheet" href="/resa/css/themify-icons.css">
	<link rel="stylesheet" href="/resa/css/pe-icon-7-filled.css">
	<link rel="stylesheet" href="/resa/css/flag-icon.min.css">
	<link rel="stylesheet" href="assets/css/cs-skin-elastic.css">
	<link rel="stylesheet" href="/resa/css/style.css">

	<!--<link href = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/5.0.1/css/fileinput.min.css" media = "all" rel = "stylesheet" type = "text/css" />-->


	<link rel="stylesheet" href="/resa/css/mytask.css">
	<link href="/resa/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"  rossorigin ="anonymous">
	<link href="/resa/themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>


	<link rel="stylesheet" href="/resa/css/datepicker.css">

	<link href="/resa/vendors/pnotify/dist/pnotify.css" rel="stylesheet">
	<link href="/resa/vendors/pnotify/dist/pnotify.buttons.css" rel="stylesheet">
	<link href="/resa/vendors/pnotify/dist/pnotify.nonblock.css" rel="stylesheet">

	<style>





		.modals {
			position: fixed;
			/* top: 26px; */
			/* right: 0; */
			bottom: 0;
			/* left: 32px; */
			z-index: 1050;
			display: none;
			overflow: hidden;
			outline: 0;
			background: rgba(0,0,0,0.5)
		}

		/*.modal-backdrop {
        filter: alpha(opacity=0.5)!important;
        opacity: 0.5!important;
        }*/
		::-webkit-scrollbar {/*滚动条*/
			width:5px;
		}
		::-webkit-scrollbar-track {/*滚动槽*/
			-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
			border-radius:10px;
		}
		::-webkit-scrollbar-thumb {/*滚动条滑块*/
			border-radius:10px;
			background:rgba(0,0,0,0.1);
			-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.5);
		}

		#weatherWidget .currentDesc {
			color: #ffffff!important;
		}
		body{overflow-x：hidden ;}
		.traffic-chart {
			min-height: 335px;
		}
		#flotPie1  {
			height: 150px;
		}
		#flotPie1 td {
			padding:3px;
		}
		#flotPie1 table {
			top: 20px!important;
			right: -10px!important;
		}
		.chart-container {
			display: table;
			min-width: 270px ;
			text-align: left;
			padding-top: 10px;
			padding-bottom: 10px;
		}
		#flotLine5  {
			height: 105px;
		}

		#flotBarChart {
			height: 150px;
		}
		#cellPaiChart{
			height: 160px;
		}
		.right-panel {
			background: #f1f2f7;
			margin-left: 224px;
			margin-top: 55px;
		}
		aside.left-panel {
			background: #fff;
			height: 100vh;
			padding: 0;
			vertical-align: top;
			width: 224px;
			-webkit-box-shadow: 1px 0 20px rgba(0, 0, 0, 0.08);
			box-shadow: 1px 0 20px rgba(0, 0, 0, 0.08);
			position: fixed;
			left: 0;
			bottom: 0;
			top: 55px;
			z-index: 999
		}
		.yanfa{
			color: #1FD6BB;
		}
		.task{
			color: #64BF62;
		}
		.quexian{
			color:#F95A55
		}
		.oneUl{
			padding: 3px 3px;
			margin: 30px 2px;
			text-align: center;
			cursor: pointer;
			position: relative;
		}
		.oneUl  i{
			color: #00c292;
		}
		.oneUl:hover{
			background-color: #F5F5F9;
		}
		.navDiv{
			background: #F5F5F9;;
			width:320px;
			position: absolute;
			top: 0px;
			z-index: -2;
			height: 27px;
			left: -280px;
			cursor: pointer;
			transition: all  0.5s;
		}
		/*ease-in-out*/
		.navDiv li{
			width:100px;
			height: 27px;
			display: block;
			line-height: 27px;
			float: left;
			margin: 0px 24px;
			background: #00c292;
			padding: 0px 20px;
		}
		#modl{
			width: 898px;
			height: 509px;
			position: absolute;
			top: 0px;
			z-index: 1000;
			left: 0px;
			background: white;
			text-align: center;
		}
	</style>
</head>

<body class="open">
<!-- Left Panel -->
<aside id="left-panel" class="left-panel">
	<nav class="navbar navbar-expand-sm navbar-default">
		<div id="main-menu" class="main-menu collapse navbar-collapse">

			<shiro:hasPermission name="/resa">
			<ul  style="width: 83px">
				<shiro:hasPermission name="/resa/task">
				<li class="oneUl">
					<i class="menu-icon fa fa-cogs"></i>任务
					<ul class="nav navDiv">
						<shiro:hasPermission name="/resa/task/mytask.do">
							<li data-href="/resa/task/mytask.do">我负责的</li>
						</shiro:hasPermission>
					</ul>
				</li>
				</shiro:hasPermission>
				<shiro:hasPermission name="/resa/project">
				<li class="oneUl">
					<i class="menu-icon fa fa-cogs"></i>项目
					<ul class="nav navDiv">
						<shiro:hasPermission name="/resa/project/project_create.do">
							<li data-href="/resa/project/project_create.do">创建项目</li>
						</shiro:hasPermission>
						<shiro:hasPermission name="/resa/project/projects.do">
							<li data-href="/resa/project/projects.do">项目库</li>
						</shiro:hasPermission>
					</ul>
				</li>
				</shiro:hasPermission>

				<li class="oneUl">
					<i class="menu-icon fa fa-cogs"></i>操作
					<ul class="nav navDiv">
						<shiro:hasPermission name="/resa/houtai">
						<li><a href="http://localhost:8888/sys/login">进入后台</a></li>
						</shiro:hasPermission>
						<li><a href="/resa/logout.do"> Logout</a></li>
					</ul>
				</li>

			</ul>
			</shiro:hasPermission>
		</div><!-- /.navbar-collapse -->
	</nav>
</aside>
<!-- /#left-panel -->
<!-- Right Panel -->
<div id="right-panel" class="right-panel">
	<!-- Header-->
	<header id="header" class="header">
		<div class="top-left">
			<div class="navbar-header">
				<a class="navbar-brand" href="/resa/home.do"><img src="images/logos.png" alt="Logo" style="height: 38px;margin-left: -30px;"></a>
				<!--<a class="navbar-brand hidden" href="/resa/home.do"><img src="images/logo2.png" alt="Logo"></a>-->
				<!--<a id="menuToggle" class="menutoggle"><i class="fa fa-bars"></i></a>-->
			</div>
		</div>
		<div class="top-right">
			<div class="header-menu">
				<div class="header-left">

				</div>
				<div class="user-area dropdown float-right">
					<a href="#" class="dropdown-toggle active" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
						<img class="user-avatar rounded-circle" th:attr="src=${message.url}+${message.adminuser.filepath}" >
					</a>

					<div class="user-menu dropdown-menu">
						<shiro:hasPermission name="/resa/houtai">
						<a class="nav-link" id="logins" href="http://localhost:8888/sys/"><i class="fa fa- user"></i>进入后台</a>
						</shiro:hasPermission>
						<!--<a class="nav-link" href="#"><i class="fa fa- user"></i>操作记录 <span class="count">13</span></a>-->

						<!--<a class="nav-link" href="#"><i class="fa fa -cog"></i>登出</a>-->

						<a class="nav-link" href="/resa/logout.do"><i class="fa fa-power -off"></i>Logout</a>
					</div>
				</div>

			</div>
		</div>
	</header>
	<shiro:hasPermission name="/resa/project">
	<!-- /#header -->
	<div class="embed-responsive embed-responsive-16by9" style="height: 610px;">
		<iframe id ="iframes" name="iframes" class="embed-responsive-item" src="/resa/html/content.do" ></iframe>
	</div>
	</shiro:hasPermission>






	<div class="modal modals fade" id="task2" title="0" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" > <!--data-backdrop="static"-->
		<div class="modal-dialog" >

			<div class="modal-content">
				<!--<div class="embed-responsive embed-responsive-16by9">
                    <iframe id="model-task"class="embed-responsive-item" src="/resa/task/model-task.html" ></iframe>
                  </div>-->
				<div class="card">
					<div class="card-header">
						<span id="taskId" style="background-color:rgba(34,215,187,.1);color: #22d7bb;padding: 5px;"></span>
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

					</div>
					<div class="card-body">
						<div class="col-12" style="padding-bottom: 15px;">
							<div id="title" style="font-size: 20px;">测试标题</div>
						</div>
						<div class="row">
							<div class="col-lg-3 col-md-3">
								<div class="card">
									<div class="card-body">
										<div class="stat-widget-four">
											<div class="stat-icon dib" >
												<div id="icon" class="stat-icon dib flat-color-1">
													<i class="menu-icon ti-power-off"></i>
												</div>
											</div>
											<div class="stat-content">
												<div class="text-left dib text">
													<div id="taskStatus" class="">未处理</div>
													<div class="text-hui" >当前状态</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>

							<div id="user" class="col-lg-3 col-md-3">
								<div class="card">
									<div class="card-body">
										<div class="stat-widget-four">
											<div class="stat-icon dib">
												<a class="" href="./"><img style="border-radius: 50px;width:38px" src="/resa/images/admin.jpg" alt="Logo"></a>
											</div>
											<div class="stat-content">
												<div class="text-left dib text">
													<div id="username">Users</div>
													<div class="text-hui">负责人</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>




							<div id="time" class="col-lg-6 col-md-6">
								<div class="card hover">
									<div class="card-body ">
										<!--<div class="stat-widget-four">
                                            <div class="stat-icon dib">
                                                <i class="menu-icon fa fa-calendar-minus"></i>
                                            </div>-->
										<div class="stat-content">
											<div class="text-left dib text">
												<!--<div class="datepicker" >-->

												<div class="mt40" style="margin-left: 23px;">
													<div class="c-datepicker-date-editor  J-datepicker-range-day mt10">
														<i class="c-datepicker-range__icon kxiconfont icon-clock"></i>
														<input placeholder="开始日期" id="startTime" name="startTime" class="c-datepicker-data-input only-date" value="2019-01-24">
														<span class="c-datepicker-range-separator">-</span>
														<input placeholder="结束日期" id="endTime" name="" class="c-datepicker-data-input only-date" value="">

													</div>

												</div>

												<!--<input type="date" />-->

												<!--<div class="text-hui">开始时间</div>-->
												<!--</div>-->
												<!--</div>-->
											</div>
										</div>
									</div>
								</div>

								<!--<div class="col-lg-3 col-md-3">
                                    <div class="card hover">
                                        <div class="card-body">
                                            <div class="stat-widget-four">
                                                <div class="stat-icon dib">
                                                    <i class="menu-icon fa fa-calendar-check"></i>
                                                </div>
                                                <div class="stat-content">
                                                    <div class="text-left dib text">
                                                       <div class="datepicker" >
                                                            <input id="jiezhidate" type="date" value="2019-02-05"/>
                                                        </div>
    </div>
                                                        <div class="text-hui">截止时间</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>-->
							</div>

						</div>
						<div  id="taskinfoModel" class="card-block">
							<div class="row">
								<div class="col-md-12"  style="padding-top: 30px;">
									<div class="custom-tab">

										<nav>
											<div class="nav nav-tabs" id="nav-tab" role="tablist">
												<a class="nav-item nav-link active" id="custom-nav-home-tab" data-toggle="tab" href="#taskinfo-home" role="tab" aria-controls="custom-nav-home" aria-selected="true"><i class="menu-icon fa fa-bars"></i>&nbsp;任务信息</a>
												<a class="nav-item nav-link" id="custom-nav-profile-tab" data-toggle="tab" href="#taskinfo-file" role="tab" aria-controls="custom-nav-profile" aria-selected="false"><i class="menu-icon fa fa-paperclip"></i>&nbsp;附件</a>
											</div>
										</nav>
										<div class="tab-content pl-3 pt-2" id="nav-tabContent">
											<div class="tab-pane fade show active info" id="taskinfo-home" role="tabpanel" aria-labelledby="custom-nav-home-tab">
												<div class="row" style="color: #868E96;">
													<div class="col-md-4">

														<div class="col-md-12">任务类型:</div>
														<div class="col-md-12 cs" id="taskType" style="color: black; padding-top: 1rem;">
															<i class="menu-icon fa fa-check-square" style="color: #00c292;"></i>
															任务</div>

													</div>
													<div class="col-md-4" >
														<div class="col-md-12">优先级:</div>
														<div class="col-md-12 cs">
															<form id="selectfrom"  style="font-size: 0.5rem;" role="form">
																<div class="form-group" data-placeholder="Choose a Country...">
																	<select id="select" class="form-control select " style="font-size: 14px;" >
																		<option value="正常">正常</option>
																		<option value="紧急">紧急</option>
																		<option value="非常紧急">非常紧急</option>
																	</select>
																</div>
															</form>
														</div>

													</div>
													<div class="col-md-4">
														<div class="col-md-12">标签:</div>
														<div class="col-md-12 cs biaoqian">
															<!--<i class="menu-icon  ti-plus"></i>&nbsp;-->
															没有标签</div>
													</div>
												</div>
												<div class="row " style="color:#607d8b">
													<div class="col-md-4">
														<div class="col-md-12">指派人:</div>
														<div class="col-md-12">
															<div id="chanyuren"  ><a class="" href="./"><img style="border-radius: 50px;width:38px" src="/resa/images/admin.jpg" alt="Logo"></a></div>		<!--			data-toggle="modal" data-target="#people"	-->
														</div>
														<!--<div class="card">
                                                            <div class="chanyuren">
                                                                +
                                                            </div>
                                                        </div>-->
													</div>
												</div>

												<div class="row" style="color:#607d8b;margin-top: 1rem;">
													<div class="col-md-4">
														<div class="col-md-12">描述:</div>
														<div class="col-md-12" id="miaoshu" style="margin-top: 1rem;">无：<a href="#"  style="color:#22d7bb;">添加描述</a></div>
														<!--<div class="col-md-12 cs" style="color: black; padding-top: 1rem;">
                                                            <i class="menu-icon fa fa-check-square" style="color: #00c292;"></i>
                                                        任务</div>-->
														<!--<div class="col-md-12">描述</div>-->
													</div>
													<!--<div class="col-md-4">
                                                    </div>-->
													<div class="col-md-12" id="area" style="margin-top: 1rem;display: none;">
														<div class="adjoined-bottom">
															<div class="grid-container">
																<div class="grid-width-100">
																	<div id="editor">
																		<h1>Hello world!</h1>
                                                                        <p>I'm an instance of <a href="https://ckeditor.com">CKEditor</a>.</p>
																	</div>
																</div>
															</div>
														</div>
														<!--<form>
                                                            <button type="submit" class="btn btn-primary btn-sm">保存</button>
                                                            <button type="reset" class="btn btn-secondary btn-sm">取消</button>
                                                        </form>-->
													</div>

												</div>

											</div>
											<div class="tab-pane fade info" id="taskinfo-file" role="tabpanel" aria-labelledby="custom-nav-profile-tab">
												<div class="row">
													<div class="col-sm-6 col-md-6">共<span id="file-size">0</span>个附件</div>

												</div>
												<div class="row">
													<div class="col-md-12">
														<div class="file-preview">

															<div class="file-drop-zone">
																<table class="table table-bordered table-hover">
																	<tbody id="fileTbody" class="file-preview-thumbnails">
																	<!--<tr class="file-preview-frame explorer-frame  kv-preview-thumb" id="preview-1549262305236_13-0" data-fileindex="0" data-template="image">-->
																		<!--<td class="kv-file-content">-->
																			<!--<div class="file-preview-other">-->
																				<!--<span class="file-other-icon"><i class='fa fa-file-word-o'></i></span>-->
																			<!--</div>-->
																		<!--</td>-->
																		<!--<td class="file-details-cell">-->
																			<!--<div class="explorer-caption" title="springmvc流程.png">springmvc流程.png</div>  <samp>(23.72 KB)</samp><div class="file-thumb-progress kv-hidden">-->
																			<!--<div class="progress">-->
																				<!--<div class="progress-bar bg-success progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%;">-->
																					<!--Initializing...-->
																				<!--</div>-->
																			<!--</div>-->
																		<!--</div>-->
																		<!--</td>-->
																		<!--<td class="file-actions-cell">-->

																			<!--<div class="file-actions">-->
																				<!--<div class="file-footer-buttons">-->
																					<!--<button type="button" class="kv-file-upload btn btn-sm btn-kv btn-default btn-outline-secondary" title="download file"><i class="fas fa-download"></i></button>-->
																					<!--<button type="button" class="kv-file-remove btn btn-sm btn-kv btn-default btn-outline-secondary" title="Remove file"><i class="fas fa-trash-alt"></i></button>-->
																					<!--<button type="button" class="kv-file-zoom btn btn-sm btn-kv btn-default btn-outline-secondary" title="View Details"><i class="fas fa-search-plus"></i></button>      </div>-->
																				<!--</div>-->
																		<!--</td>-->
																	<!--</tr>-->


																	<!--<tr style="display:none" class="kv-zoom-cache-theme">
                                                                        <td><table class="kv-zoom-cache">
                                                                            <tbody>
                                                                                <tr class="file-preview-frame explorer-frame  kv-zoom-thumb" id="zoom-preview-1549262305236_13-0" data-fileindex="0" data-template="image">
                                                                                    <td class="kv-file-content">
                                                                                        <img src="" class="file-preview-image kv-preview-data" title="springmvc流程.png" alt="springmvc流程.png" style="width:auto;height:60px;max-width:100%;max-height:100%;">
                                                                                    </td>
                                                                                    <td class="file-details-cell">
                                                                                        <div class="explorer-caption" title="springmvc流程.png">springmvc流程.png</div>
                                                                                        <samp>(23.72 KB)</samp><div class="file-thumb-progress kv-hidden">
                                                                                        <div class="progress">
                                                                                            <div class="progress-bar bg-success progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%;">
                                                                                                Initializing...
                                                                                             </div>
                                                                                        </div>
                                                                                        </div>
                                                                                    </td>
                                                                                    <td class="file-actions-cell">
                                                                                        <div class="file-upload-indicator" title="Not uploaded yet">
                                                                                            <i class="fas fa-plus-circle text-warning"></i>
                                                                                        </div>
                                                                                        <div class="file-actions">
                                                                                            <div class="file-footer-buttons">
                                                                                                <button type="button" class="kv-file-upload btn btn-sm btn-kv btn-default btn-outline-secondary" title="Upload file"><i class="fas fa-upload"></i></button>  <button type="button" class="kv-file-remove btn btn-sm btn-kv btn-default btn-outline-secondary" title="Remove file"><i class="fas fa-trash-alt"></i></button>
                                                                                                 <button type="button" class="kv-file-zoom btn btn-sm btn-kv btn-default btn-outline-secondary" title="View Details"><i class="fas fa-search-plus"></i></button>
                                                                                            </div>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                </tbody>
                                                                        </table>
                                                                        </td>
                                                                    </tr>-->
																	</tbody>
																</table>
																<!--<div class="clearfix"></div>
                                                                <div class="file-preview-status text-center text-success"></div>
                                                                <div class="kv-fileinput-error file-error-message" style="display: none;"></div>-->
															</div>


														</div>

													</div>
												</div>
												<div class="row">
													<div class="col-sm-6 col-md-6"  style="text-align: left;" ><div>+添加附件</div></div>
													<div class="col-md-12">

														<form  enctype="multipart/form-data" >
															<div class="file-loading">
																<input id="kv-explorer"  name="file" type="file" multiple>
															</div>
															<br>
														</form>
														<!--<form enctype="multipart/form-data">-->
															<!--<div class="file-loading">-->
																<!--<input id="kv-explorer" type="file" multiple>-->
															<!--</div>-->
															<!--<br>-->
															<!--<button type="submit" class="btn btn-primary">Submit</button>-->
															<!--<button type="reset" class="btn btn-outline-secondary ">Reset</button>-->
														<!--</form>-->
													</div>
												</div>
											</div>
										</div>

									</div>
								</div>

							</div>

						</div>

						<div id="modl">
							<img src="/resa/images/ww_loading.gif">
						</div>
					</div>



				</div>
				<div class="card-footer right">
					<button type="submit" id="updateTaskInfo" class="btn btn-success btn-sm">保存</button>
					<!--<button type="reset" class="btn btn-secondary btn-sm">取消</button>-->
				</div>






			</div>
		</div>
	</div>




</body>
<script src="/resa/js/vendor/jquery-2.1.4.min.js"></script>
<script src="/resa/js/popper.min.js"></script>

<script src="/resa/js/jquery.matchHeight.min.js"></script>
<script src="/resa/js/main.js"></script>
<script src="/resa/js/lib/chosen/chosen.jquery.min.js"></script>

<!--	 <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
-->
<script src="/resa/js/jquery-1.10.2.js"></script>

<script src="/resa/js/plugins/moment.min.js"></script>
<script src="/resa/js/datepicker.all.js"></script>

<script src="/resa/js/plugins/sortable.js" type="text/javascript"></script>
<script src="/resa/js/fileinput.js" type="text/javascript"></script>
<script src="/resa/js/locales/fr.js" type="text/javascript"></script>
<script src="/resa/js/locales/es.js" type="text/javascript"></script>
<!--<script src="/resa/themes/fas/theme.js" type="text/javascript"></script> -->
<script src="/resa/themes/explorer-fas/theme.js" type="text/javascript"></script>

<script src="/resa/js/ckeditor.js"></script>
<script src="/resa/js/sample.js"></script>
<script src="/resa/js/bootstrap.min.js"></script>
<!-- PNotify -->
<script src="/resa/vendors/pnotify/dist/pnotify.js"></script>
<script src="/resa/vendors/pnotify/dist/pnotify.buttons.js"></script>
<script src="/resa/vendors/pnotify/dist/pnotify.nonblock.js"></script>

<script type="application/javascript">
	var i=0;
	var datas=0;
	jQuery(document).ready(function($) {



        $('#task2').on('hide.bs.modal', function () {
            var tas=$('#task2', window.parent.document)
            $(tas).find("#modl").show();
			$("#kv-explorer").fileinput('clear')
			$("#custom-nav-home-tab").attr("aria-selected",true);
			$("#custom-nav-home-tab").addClass('active')
			$("#custom-nav-home-tab").addClass('show')
			$("#taskinfo-home").addClass('active')
			$("#taskinfo-home").addClass('show')

			$("#custom-nav-profile-tab").attr("aria-selected",false);
			$("#custom-nav-profile-tab").removeClass('active')
			$("#custom-nav-profile-tab").removeClass('show')
			$("#taskinfo-file").removeClass('active')
			$("#taskinfo-file").removeClass('show')
        })

		setInterval(function(){
			$(".navDiv").each(function(i,m){
				$(this).css("width",((($(m).find("li")).length)*180)+'px')
			})
		},30)
		$(".navDiv").each(function(i,m){
			$($(m).find("li")).each(function(n,nn){
				$(nn).click(function(){
					var url=$(this).attr("data-href")
					$(".embed-responsive-item").attr("src",url)
				})
			})

		})

		$('.oneUl').each(function(){
			var ul=$('.oneUl')

			$(this).mouseover(function(){

				$($(this).find("ul")[0]).css("left",'80px');
			})

			$(this).mouseout(function(){

				$($(this).find("ul")[0]).css("left",'-280px');
			})
		})


		//关闭点击之后下拉菜单关闭
//		$("body").on('click','[data-stopPropagation]',function (e) {
//	        e.stopPropagation();
//	    });
//
		var ul=$(".menu-item-has-children").children("ul")
		ul.each(function(i,n){
			if(n.children.length>0){
				console.log(n.children)
				$(n.children).click(function(){
					console.log($(this).children("a").attr("title"))
					var url=$(this).children("a").attr("title");
					$(".embed-responsive-item").attr("src",url)
				})
			}


		})


		//添加描述
		$("#miaoshu").click(function(){
			$("#area").show();
			$("#miaoshu").hide()
		})


		$("#updateTaskInfo").click(function(){

			var  isf=$("#cke_editor").find("#cke_1_contents").children("iframe");
			var des="";
			if($(isf).contents().find("body").text()!=""){
				des=$(isf).contents().find("body").html();
			}


			console.log(des.trim())
			//修改任务信息 id缓存redis select
			var datass={"startTime":$("#startTime").val(),
				"endTime":$("#endTime").val(),
				"select":$("#select").val(),
				"editor":des}
			$.ajax({
				url:"/resa/task/update.do",
				type:"POST",
				data:datass,
				dataType:"json",
				success:function(result){
					console.log("000000")
					console.log(result)
					if(result.code==200){
						console.log("更新成功")
						new PNotify({
							title: "更新任务信息",
							text: "更新成功",
							type: "success",
							styling: 'bootstrap3'
						});
					}
				}
			})

		})


		fileUpload();
		data();
		initSample();
		download()
	});
	//下载文件
	function download(){
		$(".kv-file-upload").click(function(){
		    // console.log($(this).parent())
			var fid=$($(this).parent().find('.fid')[0]).text();
			window.location.href="/resa/download/"+fid+".do";
		})
	}
//删除文件
function deletes(){
	$(".kv-file-remove").click(function(){
		var tes=$(this).parent()
		if(confirm("是否确认删除？")){
			var fid=$($(this).parent().find('.fid')[0]).text();
			// window.location.href="/resa/delete/"+fid+".do";
			$.ajax({
				url:'/resa/delete/'+fid+'.do',
				dataType:'json',
				type:'post',
				success:function(result){
					if(result.code==200){
						new PNotify({
							title: "文件删除",
							text: "删除文件成功",
							type: "info",
							styling: 'bootstrap3'
						});
						var io=$("#file-size").text()
						$("#file-size").text(io-1)
						$($(tes).parent().parent().parent()).remove()

					}
				}
			})
		}
	})
}
function fileUpload(){
	// var preview
	// $.ajax({
	// 	url: '/resa/task/taskInfo/' + id + '.do',
	// 	dataType: 'JSON',
	// 	type: 'POST',
	// 	success: function (result) {
	// 		if (result.code == 200) {
	// 			console.log(result)
	// 		}
	// 	}
	// })

	//文件上传
	$("#kv-explorer").fileinput({
		theme: 'explorer-fas',
		language: 'zh',
		uploadUrl: '/resa/project/fileUpload/task/'+$("#taskId").text()+'.do',
		overwriteInitial: false,
		initialPreviewAsData: true
		// initialPreview: [
		//     "http://lorempixel.com/1920/1080/nature/1",
		//     "http://lorempixel.com/1920/1080/nature/2",
		//     "http://lorempixel.com/1920/1080/nature/3"
		// ],
		// initialPreviewConfig: [
		//     {caption: "nature-1.jpg", size: 329892, width: "120px", url: "{$url}", key: 1},
		//     {caption: "nature-2.jpg", size: 872378, width: "120px", url: "{$url}", key: 2},
		//     {caption: "nature-3.jpg", size: 632762, width: "120px", url: "{$url}", key: 3}
		// ]
	}).on('filepreupload', function(event, data, previewId, index) {     //上传中
		var form = data.form, files = data.files, extra = data.extra,
				response = data.response, reader = data.reader;
		console.log('文件正在上传');
		console.log(files)
		datas=files.length;
		i++;
		console.log("data:"+datas);
		console.log("i:"+i);
	}).on("fileuploaded", function (event, data, previewId, index) {    //一个文件上传成功
		console.log('文件上传成功！'+data.id);
		new PNotify({
			title: "文件上传",
			text: "上传附件成功",
			type: "info",
			styling: 'bootstrap3'
		});
		if(i==datas){
			new PNotify({
				title: "文件上传",
				text: "所有附件上传完成",
				type: "success",
				styling: 'bootstrap3'
			});
			// window.iframes.show($("#taskId").text());
			show($("#taskId").text())
			i=0;
		}
	}).on('fileerror', function(event, data, msg) {  //一个文件上传失败
		console.log('文件上传失败！'+data.id);
	});
}


	//时间插件
	function data(){
		var DATAPICKERAPI = {
			// 快捷选项option
			rangeShortcutOption1: [{
				name: '最近一周',
				day: '-7,0'
			}, {
				name: '最近一个月',
				day: '-30,0'
			}, {
				name: '最近三个月',
				day: '-90, 0'
			}],
		};

		//年月日范围
		$('.J-datepicker-range-day').datePicker({
//          hasShortcut: true,
			format: 'YYYY-MM-DD',
			isRange: true,
			shortcutOptions: DATAPICKERAPI.rangeShortcutOption1
		});



	}





    function show(id){

        console.log($('#task2'))
        var task2= $('#task2')
        $('#task2').modal("show");
        // $('#task2', window.parent.document).modal("toggle");
        $.ajax({
            url:'/resa/task/taskInfo/'+id+'.do',
            dataType:'JSON',
            type:'POST',
            success:function(result){
                if(result.code==200){
                    console.log(result.data)
                    var data=result.data.taskinfo;
                    var file=result.data.taskfile;
                    var icon = (data.icon).substring((data.icon).indexOf("<i"), (data.icon).indexOf("i>") + 2)
                    switch (icon) {
                        case "<i class='menu-icon fa fa-power-off'></i>":icon="<i class='menu-icon ti-power-off'></i>";break;
                    }
                    $(task2).find(".card-header").find("span").text(id)
                    var cardbody=$(task2).find(".card-body");
                    cardbody.find("#title").text(data.title);
                    cardbody.find("#icon").removeClass();
                    cardbody.find("#icon").addClass("stat-icon dib flat-color-"+data.taskStatusId)
                    cardbody.find("#icon").html(icon);
                    cardbody.find("#taskStatus").text(data.ptName)
                    cardbody.find("#user").find("img").attr("src",data.url+data.filePath);
                    cardbody.find("#user").find("#username").text(data.account)
                    cardbody.find("#time").find("#startTime").attr("value",data.startTime)
                    cardbody.find("#time").find("#endTime").attr("value",data.endTime)

                    //描述
                    // cardbody.find("#miaoshu")
                    console.log("描述")
                    console.log(data.description);
                    if(data.description!=undefined){
                        cardbody.find("#miaoshu").click();
                        var  isf=cardbody.find("#cke_editor").find("#cke_1_contents").children("iframe");
                        $(isf).contents().find("body").html(data.description)
                        // console.log($(isf).contents().find("body").html());

                        // cardbody.find("#editor").html("<p>"+data.description+"</p>")
                    }else{
                        var  isf=cardbody.find("#cke_editor").find("#cke_1_contents").children("iframe");
                        $(isf).contents().find("body").html("")
                        cardbody.find("#area").hide();
                        cardbody.find("#miaoshu").show()

                    }
                    var option=cardbody.find("#taskinfoModel").find("#select").find("option");
                    $(option).each(function(i,m){
                        console.log(data.tOrderBy)
                        $(m).removeAttr("selected");
                        if($(m).val()==data.tOrderBy){
                            $(m).prop("selected",true);
                        }
                    })
                    cardbody.find("#taskinfoModel").find("#taskType").html(data.typeIcon+data.tName);
                    cardbody.find("#taskinfoModel").find("#chanyuren").find("img").attr("src",data.url+data.fFilePath);

                    console.log("文件")

                    console.log(file)
                    cardbody.find("#taskinfo-file").find("#file-size").text(file.length);
                    cardbody.find("#fileTbody").html("")
                    var cent="";
                    $(file).each(function(i,m){

                        cent+='<tr class="file-preview-frame explorer-frame  kv-preview-thumb" id="preview-1549262305236_13-0" data-fileindex="0" data-template="image">'+
                            '<td class="kv-file-content">'+
                            '<div class="file-preview-other">'+
                            '<span class="file-other-icon">'+m.ficon+'</span>'+
                            '</div>'+
                            '</td>'+
                            '<td class="file-details-cell">'+
                            '<div class="explorer-caption" title="'+m.fTitle+'">'+m.fTitle+'</div><samp>'+m.size+'</samp><div class="file-thumb-progress kv-hidden">'+
                            '<div class="progress">'+
                            '<div class="progress-bar bg-success progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%;">'+
                            'Initializing...'+
                            '</div>'+
                            '</div>'+
                            '</div>'+
                            '</td>'+
                            '<td class="file-actions-cell">'+
                            '<div class="file-actions">'+
                            '<div class="file-footer-buttons"><span class="fid" style="display: none">'+m.fId+'</span> '+
                            '<button type="button" class="kv-file-upload btn btn-sm btn-kv btn-default btn-outline-secondary" title="download file"><i class="fas fa-download"></i></button>'+
                            '<button type="button" class="kv-file-remove btn btn-sm btn-kv btn-default btn-outline-secondary" title="Remove file"><i class="fas fa-trash-alt"></i></button>'+
                            '</div>'+
                            '</td>'+
                            '</tr>'

                    })
                    cardbody.find("#fileTbody").append(cent);


                }
                download();
                deletes()
                setTimeout(function(){
                    cardbody.find("#modl").hide();
                },1000)
            }
        })

    }
</script>
</html>
